package com.zzzy.com.zzzy.controller;


import io.goeasy.GoEasy;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {

    @ResponseBody
    @RequestMapping("/hello")
    public String sayHello(){
        return "Hello World！";
    }

    @ResponseBody
    @RequestMapping("/go")
    public String GoEasy(){

        GoEasy goEasy = new GoEasy("https://rest-hangzhou.goeasy.io", "BC-6e89b9f8ef0b4143880a6cf0483ca769");
        goEasy.publish("demo_channel", "Hello world!");
        return "Hello World";
    }



}
